from django.db import models

# Create your models here.
class category(models.Model):
    id = models.AutoField(primary_key=True)
    name = models.CharField(max_length=50,unique=True,verbose_name='类目名称')
    desci = models.CharField(max_length=50,verbose_name='描述')
    datet = models.DateTimeField(auto_now_add=True)

class Fu(models.Model):
    id = models.AutoField(primary_key=True)
    title = models.CharField(max_length=20,verbose_name='服饰名称')
    price = models.DecimalField(max_digits=50,decimal_places=2,verbose_name='服饰价格')
    publish_date = models.DateTimeField(auto_now_add=True)
    category = models.ForeignKey(category,on_delete=models.CASCADE,related_name='aa')